package com.zhijian.medical.service;

import com.zhijian.medical.entity.po.ProductSendOutDetailBatch;
import com.zhijian.medical.entity.vo.request.ProductSendOutDetailBatchSearchVo;
import com.zhijian.medical.entity.vo.response.ProductSendOutDetailBatchVo;
import com.zhijian.medical.util.Page;

import java.util.List;

/**
 * 产品订单发货，批次号-数量表 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2022-03-21 15:57:40
 */
public interface ProductSendOutDetailBatchService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    ProductSendOutDetailBatch selectById(Long id);

    /**
     * 主键查询vo
     *
     * @param id
     * @return
     */
    ProductSendOutDetailBatchVo selectVoById(Long id);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 新增
     *
     * @param productSendOutDetailBatch
     * @return
     */
    Long insert(ProductSendOutDetailBatch productSendOutDetailBatch);

    /**
     * 动态修改
     *
     * @param record
     * @return
     */
    boolean updateByPrimaryKeySelective(ProductSendOutDetailBatch record);

    /**
     * 更改
     *
     * @param productSendOutDetailBatch
     * @return
     */
    boolean update(ProductSendOutDetailBatch productSendOutDetailBatch);

    /**
     * 总数
     *
     * @param productSendOutDetailBatchSearchVo
     * @return
     */
    Integer count(ProductSendOutDetailBatchSearchVo productSendOutDetailBatchSearchVo);

    /**
     * 列表
     *
     * @param productSendOutDetailBatchSearchVo
     * @return
     */
    List<ProductSendOutDetailBatchVo> selectList(ProductSendOutDetailBatchSearchVo productSendOutDetailBatchSearchVo);

    /**
     * 分页查询
     *
     * @param productSendOutDetailBatchSearchVo
     * @return
     */
    Page<ProductSendOutDetailBatchVo> selectPage(ProductSendOutDetailBatchSearchVo productSendOutDetailBatchSearchVo);

    /**
     * 汇总一次产品申请的总量
     *
     * @param productId
     * @return
     */
    Integer sumQuantityByProductId(Long productId);
}